﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;
using WebApiV3.Date.Entity;

namespace WebApiV3.Date
{
    public class Admin0003Context : DbContext
    {
        public Admin0003Context()
        {

        }

        //连接数据库
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            var connectionString = "server=.;database=Admin1000;uid=sa;pwd=123456";
            optionsBuilder.UseSqlServer(connectionString);
        }

        public DbSet<Users> Users { get; set; }
        public DbSet<Roles> Roles { get; set; }
    }
}
